<#include "../common/nolayout.ftl"/>
<@html css_=['life/user/user.css'] js_=['life/file.js']>
<body class="childrenBody">
    <blockquote class="layui-elem-quote news_search">
        <form class="layui-form" id="listForm" action="${root}/up/list" method="post">
            <input type="hidden" name="number" id="number" value="1"/>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="请输入用户登录名" name="username" class="layui-input ">
                </div>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="请输入文件登录名" name="filename" class="layui-input ">
                </div>
                <a class="layui-btn search_btn" lay-submit lay-filter="queryForm">查询</a>
            </div>
        </form>
    </blockquote>
    <div class="layui-form users_list">
        <table class="layui-table">
            <thead>
            <tr>
                <th>头像</th>
                <th>登录名</th>
                <th>文件视图</th>
                <th>文件名</th>
                <th>文件大小</th>
                <th>上传状态</th>
                <th>上传时间</th>
            </tr>
            </thead>
            <tbody id="listDataBody"></tbody>
        </table>
    </div>
    <div  id="page"></div>
</body>

<script type="text/html" id="addUser">
    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">登录名</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input username" name="username" maxlength="16" placeholder="请输入用户登录名">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input email" name="email" maxlength="16" placeholder="请输入用户邮箱">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input password" name="password" maxlength="16" placeholder="请输入用户密码">
            </div>
        </div>
    </form>
</script>

<script id="dataListTpl" type="text/html">
    {{#  if(d.list!=null&&d.list.length> 0){ }}
    {{#  layui.each(d.list, function(index, item){ }}
    <tr>
        <td>
            {{# if(item.headimg){ }}
            <img src="{{item.headimg}}?imageView2/0/w/80/h/40" onclick="headimg('{{item.headimg}}')" onmouseover="headimg('{{item.headimg}}');" lay-filter="headimg">
            {{#} else{ }}
            {{# } }}
        </td>
        <td>{{item.username||''}}</td>
        <td>
            <a href="<@img u_='{{item.userId}}/{{item.fileName}}' type_=99/>" target="_blank">
                <img src="<@img u_='{{item.userId}}/{{item.fileName}}' type_=9/>">
            </a>
        </td>
        <td>{{item.fileName||''}}</td>
        <td>{{item.fileSize||''}}</td>
        <td>
            {{# if(item.fileStatus==0){ }}
            成功
            {{#} else{ }}
            失败
            {{# } }}
        </td>
        <td>{{ layui.util.toDateString(item.insertDate, 'yyyy-MM-dd HH:mm:ss') }}</td>
    </tr>
    {{#  }); }}
    {{#} else { }}
    <tr>
        <td colspan="6" style="text-align: center">无数据</td>
    <tr/>
    {{# }}}

</script>
</@html>